home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / screen.swg / 0029_Get-Set Screen Colors.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-08-27  |  498 b   |  21 lines

  1. {
  2. SEAN PALMER
  3.  
  4. > I want to know how to get and set the screen colors Without using the
  5. > Crt Unit or ansi codes.  Any help is appreciated.
  6.  
  7. Change the Byte in video memory For the attribute For a Character.
  8. }
  9.  
  10. Var
  11.   ScreenMem : Array [0..24, 0..79, 0..1] of Char Absolute $B800 : 0;
  12.  
  13. Procedure changeColor(x, y, attrib : Byte);
  14. begin
  15.   screenMem[y - 1, x - 1, 1] := Char(attrib);
  16. end;
  17.  
  18. { For monochrome monitors it's Absolute $B000 : 0; }
  19. begin
  20.   ChangeColor(34, 12, $1C);
  21. end.